import { ref } from 'vue';

const useRechargePrepayment = () => {

    const rechargeVisible = ref(false);
    const rechargeData = ref();

    /** 打开 充值预付款 弹窗 */
    const handlOpenRecharge = async (row?: any) => {
        if (row) {
            rechargeData.value = row;
        }else {
            rechargeData.value = {}
        }
        rechargeVisible.value = true;
    };

    /** 关闭 充值预付款 弹窗 */
    const handleCloseRecharge = () => {
        rechargeVisible.value = false;
    };

    return {
        rechargeVisible,
        rechargeData,
        handlOpenRecharge,
        handleCloseRecharge
    }
};

export default useRechargePrepayment;
